<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>走访登记</title>
<link href="/css/layout.css" rel="stylesheet" type="text/css" />
<link href="/css/cb.css" rel="stylesheet" type="text/css" />
<link href="/css/n.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css"
	href="/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css" />
<link rel="stylesheet" type="text/css" href="/easyui/demo/demo.css" />
<link rel="stylesheet" type="text/css"
	href="/js/laypage/skin/laypage.css" />

<script type="text/javascript" src="/easyui/jquery.min.js"></script>
<script src="/js/vue/vue.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/js/laypage/laypage.js"></script>
<script type="text/javascript" src="/laydate/laydate.js"></script>
</head>
<body>
<table width="690px" height="350px" border="0" align="center"
				cellpadding="3" cellspacing="1" bgcolor="#AEDEF4" id="app1">
				<tr>
					<td align="center" bgcolor="#E2F7FE">
						<form id="form3" name="form3" method="post" action="">
							<table width="80%" border="0" cellspacing="1" cellpadding="3">
							<tr style="height: 30px">
			                   <td width="20%" align="center"><strong>矫正单位:</strong></td>
			                   <td width="20%" align="left"><select style="width: 170px; height: 30px" name="perid" id="job" onchange="changeDept()">
				            	    <option>请选择矫正单位</option>
				            	    <#list job as u>
				            	    <option value="${u.id}">${u.name}</option></#list></select></td>
			                <td width="15%" align="right"><strong>走访人员姓名:</strong></td>
			                <td  width="25%" align="left">
			                	<select style="width: 176px; height: 30px">
			                	   <option v-for="item in result" v-bind:value="item.perid">{{item.pname}}</option>
			               		</select></td>
			                </select></td> 
		                    </tr>
						    <tr style="height: 30px">
						             <td width="20%" align="center"><strong>矫正人员:</strong></td>
			                         <td  width="20%" align="left"><select style="width: 170px; height: 30px" name="pid" id="addunit" onchange="staff()">
				            	     <option>请选择矫正人员</option>
				            	     <#list corr as b>
			                	     <option value="${b.pid}" >${b.cname}</option></#list></select></td></td>
									 <td width="20%" align="center"><strong>走访日期:</strong></td>
									 <td colspan="3" width="25%" align="left">
										<input id="date" name="date" placeholder="请选择日期" style="width: 150px; height: 30px"
											class="laydate-icon" onclick="laydate()"/>
									</td>
							</tr>
							<tr>
								<td width="20%" align="center"><strong>走访场所:</strong></td>
								<td colspan="5"><textarea name="place" rows="2" cols="70"></textarea></td>
							</tr>
							<tr>
								<td width="20%" align="center"><strong>走访事由:</strong></td>
								<td colspan="5"><textarea id="reason" name="reason" rows="2" cols="70"></textarea></td>
							</tr>
							<tr>
								<td width="20%" align="center"><strong>走访内容:</strong></td>
								<td colspan="5"><textarea id="content" name="content" rows="2" cols="70"></textarea></td>
							</tr>
						</table>
						</form>
					</td>
				</tr>
	</table>
	<script type="text/javascript">
	var app1 = new Vue({
			el : '#app1',
			data : {
				result : []
			}
	});
	    //根据id查询所有工作人员
		var changeDept = function(){
		   //alert($("#job").val());
		   $.ajax({
		     url : "/interview/getByIdP",
		     type : "post",
			 dataType : "json",
		     data : {
				id : $("#job").val()
			},
			 success:function(msg){
				app1.result=msg.data;
			 }
		   });
		}
		
	</script>
</body>
</html>